'''
排序：
    冒泡排序
    选择排序
    快速排序
'''
a = 9
b = 7
a,b = b,a
print(f"a ={a},b={b}")

ls = [4,5,67,23,12,45,21,456,7]

for i in range(0,len(ls)-1):  # 循环几轮
    for j in range(0,len(ls)-i-1):  # 每一轮的操作 两两进行比较
        #比较
        if ls[j]>ls[j+1]:
            # 互换
            ls[j],ls[j+1] = ls[j+1],ls[j]
print(ls)